package com.lin.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lin.pojo.ManufactureConfigProcedureList;
import com.lin.pojo.PageVo;
import com.lin.service.ManufactureConfigProcedureListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ManufactureConfigProcedureListController {

    @Autowired
    ManufactureConfigProcedureListService procedureListService;


    @RequestMapping("queryallprocedure.action")
    public PageVo<ManufactureConfigProcedureList> queryallprocedure(@RequestParam(value = "pageno",defaultValue = "1") int pageno,
                                                                    @RequestParam(value = "pagesize",defaultValue = "5") int pagesize){

        Page<ManufactureConfigProcedureList> page = procedureListService.page(new Page<ManufactureConfigProcedureList>(pageno,pagesize));

        PageVo<ManufactureConfigProcedureList> pageVo =new PageVo<ManufactureConfigProcedureList>();
        pageVo.setRows(page.getRecords());
        pageVo.setTotal(page.getTotal());
        return pageVo;
    }



    @RequestMapping("/queryallPro.action")
    public PageVo<ManufactureConfigProcedureList> queryallPro(@RequestParam(value = "pageno",defaultValue = "1") int pageno,
                                                                    @RequestParam(value = "pagesize",defaultValue = "5") int pagesize){

        Page<ManufactureConfigProcedureList> page = procedureListService.page(new Page<ManufactureConfigProcedureList>(pageno,pagesize));

        PageVo<ManufactureConfigProcedureList> pageVo =new PageVo<ManufactureConfigProcedureList>();
        pageVo.setRows(page.getRecords());
        pageVo.setTotal(page.getTotal());
        return pageVo;
    }
}
